package org.jwcloud.project.module.zx.upload.service;

import java.io.IOException;
import java.io.InputStream;

import org.jwcloud.project.module.zx.db.domain.RtaCMsgUploadFile;
import org.springframework.web.multipart.MultipartFile;

/**
 * 文件存储管理
 * 
 * @author Administrator
 *
 */
public interface FileUploadService {
	/**
	 * 存储文件
	 * 
	 * @param file
	 * @return
	 * @throws IOException 
	 * @throws IllegalStateException 
	 * @throws Exception 
	 */
	public RtaCMsgUploadFile saveFile(MultipartFile multipartFile) throws IllegalStateException, IOException, Exception;
	/**
	 * 存储文件
	 * 
	 * @param file
	 * @return
	 * @throws IOException 
	 * @throws IllegalStateException 
	 * @throws Exception 
	 */
	public RtaCMsgUploadFile searchFile(String fileid) throws IllegalStateException, IOException, Exception;
	/**
	 * 获取文件
	 * 
	 * @param fileid
	 * @return
	 * @throws Exception 
	 */
	public InputStream getFile(String fileid) throws Exception;


}
